package per.ethan.javase.java8.streamapi;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @author Ethan
 * @date 2020/05/06 15:17
 */
public class Demo1 {

    public static void main(String[] args) {
        List<Integer> list = new ArrayList<>(Arrays.asList(1, 5, 20, 2, 6, 8));
        list.stream().sorted().forEach(System.out::println);
    }

}
